# Contributor: Bart Ribbers <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-applications
maintainer="team/kde <bribbers@disroot.org>"
pkgname=kalgebra
pkgver=24.08.2
pkgrel=0
# armhf blocked by qt6-qtdeclarative
arch="all !armhf"
url="https://edu.kde.org/kalgebra/"
pkgdesc="2D and 3D Graph Calculator"
license="GPL-2.0-or-later AND GFDL-1.2-only"
makedepends="
	analitza-dev
	extra-cmake-modules
	kconfigwidgets-dev
	kcoreaddons-dev
	kdoctools-dev
	ki18n-dev
	kio-dev
	kwidgetsaddons-dev
	libplasma-dev
	ncurses-dev
	qt6-qtbase-dev
	qt6-qtdeclarative-dev
	qt6-qtsvg-dev
	readline-dev
	samurai
	"
subpackages="$pkgname-doc $pkgname-lang"
_repo_url="https://invent.kde.org/education/kalgebra.git"
source="https://download.kde.org/stable/release-service/$pkgver/src/kalgebra-$pkgver.tar.xz"
options="!check" # No tests

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
588f09f4dcd7c9d95292bbfbfe0d9b65b0e723a3982feba62aa4a7f7588d3b547eea812d9dabafac197f394679448b628e0a07278ddc6743b1df29ca60e5542e  kalgebra-24.08.2.tar.xz
"
